//
//  LevelUpInfo.m
//  SpaceStorm
//
//  Created by  mmj on 13-7-21.
//
//

#import "LevelUpInfo.h"

@implementation LevelUpInfo
@synthesize level = _level;
@synthesize name = _name;
@synthesize exp = _exp;

+(id) infoWithTbxml:(TBXMLElement *)tbxml
{
    return [[[self alloc] initWithTbxml:tbxml] autorelease];
}

-(id) initWithTbxml:(TBXMLElement *)tbxml
{
    self = [super init];
	
	if (self!= nil)
    {
        //等级
        self.level = [[TBXML valueOfAttributeNamed:@"level" forElement:tbxml] intValue];
        //名称
        self.name = [TBXML valueOfAttributeNamed:@"name" forElement:tbxml];
        //经验
        self.exp = [[TBXML valueOfAttributeNamed:@"exp" forElement:tbxml] intValue];
    }

    return self;
}

@end
